<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let furit = prompt('输入你想查找的水果')
        switch (furit)
        {
            case '苹果':
                console.log('苹果2元一斤')
                break
            case '西瓜':
                console.log('西瓜')
                break
            case '香蕉':
                console.log("香蕉")
                break
            default:
                console.log('没有此水果')
        }
    </script>
</body>
</html>